import BasePlugin from "@/core/Frame/BaseClass/BasePlugin"
import ZoomToCommand from "./ExampleCommand"

class ExamplePlugin extends BasePlugin {
  constructor() {
    super()
  }

  // 注册命令
  registerCommands() {
    this.addCommand(ZoomToCommand)
  }

  // 订阅事件
  registerEvents() {
    this.subscribeEvent('OpenExamplePanelEvent');
  }

  // 接收事件
  handleEvent(eventType: string, args: any) {
    if (eventType === 'OpenExamplePanelEvent') {
      console.log(args)
    }
  }
}

export default ExamplePlugin

